﻿using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using Sqo;

namespace EDMD
{
    /// [Generated Jan 30 2011]    
    public partial class i_CalendarItem : Utils, ISqoDataObject
    {

        #region "private fields"

        private int _CalendarItem_ID;
        private int _CalendarItem_Calendar_ID;
        private int _Verb_ID;
        private int _Entry_ID;
        private string _Entry_Name;
        private int _Status_ID;
        private string _StatusNote;
        private bool _isNoDate;
        private bool _isAllDay;
        private bool _isNote;
        private bool _isRollover;
        private bool _isSpan;
        private bool _isEmailConfirmRequired;
        private DateTime _Start_Date;
        private DateTime _End_Date;
        private DateTime _Create_Date;
        private DateTime _Update_Date;
        private int _Created_User_ID;
        private int _Updated_User_ID;
        private string _GUID;
        private string _Salutation;
        private string _FirstName;
        private string _MiddleName;
        private string _LastName;

        #endregion

        #region "public properties"

        public int CalendarItem_ID
        {
            get { return _CalendarItem_ID; }
            set { _CalendarItem_ID = value; }
        }
        public int CalendarItem_Calendar_ID
        {
            get { return _CalendarItem_Calendar_ID; }
            set { _CalendarItem_Calendar_ID = value; }
        }
        public int Verb_ID
        {
            get { return _Verb_ID; }
            set { _Verb_ID = value; }
        }
        public int Entry_ID
        {
            get { return _Entry_ID; }
            set { _Entry_ID = value; }
        }
        public string Entry_Name
        {
            get { return _Entry_Name; }
            set { _Entry_Name = value; }
        }
        public int Status_ID
        {
            get { return _Status_ID; }
            set { _Status_ID = value; }
        }
        public string StatusNote
        {
            get { return _StatusNote; }
            set { _StatusNote = value; }
        }
        public bool isNoDate
        {
            get { return _isNoDate; }
            set { _isNoDate = value; }
        }
        public bool isAllDay
        {
            get { return _isAllDay; }
            set { _isAllDay = value; }
        }
        public bool isNote
        {
            get { return _isNote; }
            set { _isNote = value; }
        }
        public bool isRollover
        {
            get { return _isRollover; }
            set { _isRollover = value; }
        }
        public bool isSpan
        {
            get { return _isSpan; }
            set { _isSpan = value; }
        }
        public bool isEmailConfirmRequired
        {
            get { return _isEmailConfirmRequired; }
            set { _isEmailConfirmRequired = value; }
        }
        public DateTime Start_Date
        {
            get { return _Start_Date; }
            set { _Start_Date = value; }
        }
        public DateTime End_Date
        {
            get { return _End_Date; }
            set { _End_Date = value; }
        }
        public DateTime Create_Date
        {
            get { return _Create_Date; }
            set { _Create_Date = value; }
        }
        public DateTime Update_Date
        {
            get { return _Update_Date; }
            set { _Update_Date = value; }
        }
        public int Created_User_ID
        {
            get { return _Created_User_ID; }
            set { _Created_User_ID = value; }
        }
        public int Updated_User_ID
        {
            get { return _Updated_User_ID; }
            set { _Updated_User_ID = value; }
        }
        public string GUID
        {
            get { return _GUID; }
            set { _GUID = value; }
        }
        public string Salutation
        {
            get { return _Salutation; }
            set { _Salutation = value; }
        }
        public string FirstName
        {
            get { return _FirstName; }
            set { _FirstName = value; }
        }
        public string MiddleName
        {
            get { return _MiddleName; }
            set { _MiddleName = value; }
        }
        public string LastName
        {
            get { return _LastName; }
            set { _LastName = value; }
        }

        #endregion
        
        #region "ISqoDataObject"
        object ISqoDataObject.GetValue(System.Reflection.FieldInfo field) { return field.GetValue(this); }
        void ISqoDataObject.SetValue(System.Reflection.FieldInfo field, object value) { field.SetValue(this, value); }
        int ISqoDataObject.OID { get { return CalendarItem_ID; } set { } }
        #endregion
    }//public partial class i_CalendarItem : Utils, ISqoDataObject


    public partial class s_CalendarItem : i_CalendarItem
    {
        #region "MAPPER"
        public static i_CalendarItem Convert(CalendarItem od_CalendarItem)
        {
            return new i_CalendarItem()
            {

                CalendarItem_ID = IsNull(od_CalendarItem.CalendarItem_ID),
                CalendarItem_Calendar_ID = IsNull(od_CalendarItem.CalendarItem_Calendar_ID),
                Verb_ID = IsNull(od_CalendarItem.Verb_ID),
                Entry_ID = IsNull(od_CalendarItem.Entry_ID),
                Entry_Name = IsNull(od_CalendarItem.Entry_Name),
                Status_ID = IsNull(od_CalendarItem.Status_ID),
                StatusNote = IsNull(od_CalendarItem.StatusNote),
                isNoDate = IsNull(od_CalendarItem.isNoDate),
                isAllDay = IsNull(od_CalendarItem.isAllDay),
                isNote = IsNull(od_CalendarItem.isNote),
                isRollover = IsNull(od_CalendarItem.isRollover),
                isSpan = IsNull(od_CalendarItem.isSpan),
                isEmailConfirmRequired = IsNull(od_CalendarItem.isEmailConfirmRequired),
                Start_Date = IsNull(od_CalendarItem.Start_Date),
                End_Date = IsNull(od_CalendarItem.End_Date),
                Create_Date = IsNull(od_CalendarItem.Create_Date),
                Update_Date = IsNull(od_CalendarItem.Update_Date),
                Created_User_ID = IsNull(od_CalendarItem.Created_User_ID),
                Updated_User_ID = IsNull(od_CalendarItem.Updated_User_ID),
                GUID = IsNull(od_CalendarItem.GUID),
                Salutation = IsNull(od_CalendarItem.Salutation),
                FirstName = IsNull(od_CalendarItem.FirstName),
                MiddleName = IsNull(od_CalendarItem.MiddleName),
                LastName = IsNull(od_CalendarItem.LastName)
            };
        }
        #endregion        
    }//public partial class i_CalendarItem :  s_CalendarItem

}//namespace EDMD